# $Id$
# Maintainer: judd <jvinet@zeroflux.org>
pkgname=cpio
pkgver=2.12
pkgrel=3
pkgdesc="A tool to copy files into or out of a cpio or tar archive"
arch=(i686 x86_64)
license=('GPL')
url="http://www.gnu.org/software/cpio"
depends=('glibc')
source=(ftp://ftp.gnu.org/gnu/cpio/cpio-${pkgver}.tar.gz)
md5sums=('fc207561a86b63862eea4b8300313e86')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

check() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make check
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  rm -f ${pkgdir}/usr/bin/mt ${pkgdir}/pkg/usr/share/man/man1/mt.1
  rm -rf ${pkgdir}/usr/libexec
  rm -f ${pkgdir}/usr/share/man/man8/rmt.8
  # remove infodir
  rm $pkgdir/usr/share/info/dir
}
